package com.hoas.api.core.entity.api;

import java.util.Map;

import  com.hoas.api.core.exception.BusinessApiCreateException;
import  com.hoas.api.core.exception.BusinessProcessException;

/**
 * API
 * @author ZhangQingmu
 * @date   2016年10月23日
 *
 */
public class BusinessApi {

	private String apiId;

	private String businessId;
	
	private String name;

	private String description;
	
	private String type = "local";

	public BusinessApi(){}

	public BusinessApi(String businessId) throws BusinessApiCreateException {
		
		if(businessId == null || "".equals(businessId.trim())) {
			throw new BusinessApiCreateException();
		}
		
		this.businessId = businessId;
	}
	
	public String getBusinessId() {
		return businessId;
	}

	public void setBusinessId(String businessId) {
		this.businessId = businessId;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getDescription() {
		return description;
	}
	
	public void setDescription(String description) {
		this.description = description;
	}
	
	public String getType() {
		return type;
	}
	
	public void setType(String type) {
		this.type = type;
	}

	public String getApiId() {
		return apiId;
	}

	public void setApiId(String apiId) {
		this.apiId = apiId;
	}

	public Object process(Map<String, Object> parameter) throws BusinessProcessException {
		return null;
	}

}
